﻿using System.Collections.Generic;
using System.Linq;
using System.Text;
using SAP.BusinessOne.Cockpit.Models;

namespace SAP.BusinessOne.Cockpit.Services
{
    class KPIService
    {     
        public KPI GetKPI(int id)
        {
            if (id == 1)
            {
                // {"Name":"Gross Profit","Value":"7850","Goal":"10000","Trend":"0.85"}
                return new KPI
                {
                    Name = "Gross Profit",
                    Value = 7850,
                    Goal = 10000,
                    Trend = 0.85
                };
            }
            else if (id == 2)
            {
                // {"Name":"Open Sales Order","Value":"15000","Goal":"14000","Trend":"1.5"}
                return new KPI
                {
                    Name = "Open Sales Order",
                    Value = 15000,
                    Goal = 14000,
                    Trend = 1.5
                };
            }
            else
            {
                // {"Name":"Total Sales","Value":"38600","Goal":"30000","Trend":"1.75"}
                return new KPI
                {
                    Name = "Total Sales",
                    Value = 38600,
                    Goal = 30000,
                    Trend = 1.75
                };
            }

        }
    }
}
